﻿using Entity;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Utils;

namespace DataBaseConnect.IRepositories
{
    /// <summary>
    /// 菜单管理仓储接口
    /// </summary>
    public interface IMenuRepository:IRepository<Menu>
    {
        /// <summary>
        /// 根据权限获取菜单信息
        /// </summary>
        /// <param name="userId">用户id</param>
        /// <returns></returns>
        List<Menu> GetMenuList(int userId);

        /// <summary>
        /// 根据条件删除菜单权限
        /// </summary>
        /// <param name="where">删除条件</param>
        /// <returns></returns>
        ReceiveStatus DelMenuRoleMsg(Expression<Func<MenuRole, bool>> where);

        /// <summary>
        /// 根据角色id获得菜单权限
        /// </summary>
        /// <param name="RoleId">角色id</param>
        /// <returns></returns>
        List<MenuRole> GetRoleIdList(int RoleId);
    }
}
